{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Tutorial 4 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercice 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.array([-1,0,1,2])\n",
    "y = np.array([-1,1, 0,0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a1 = 0.666667\n",
      "a2 = -1.500000\n",
      "a3 = -0.166667\n",
      "a4 = 1.000000\n"
     ]
    }
   ],
   "source": [
    "a1 = 2/3\n",
    "a2 = -3/2\n",
    "a3 = -1/6\n",
    "a4=1\n",
    "print('a1 = %f' %a1)\n",
    "print('a2 = %f' %a2)\n",
    "print('a3 = %f' %a3)\n",
    "print('a4 = %f' %a4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8VPW9N/DPNyGQGCJrQDQEBFI2UYEgMSAFWRJAQREFRIuo5aI8t9LrxfX28lS5VK3YPoiyqkDZIhBQkJAGWcoOCWGRAmERJEJDWGJCNpPM9/ljBm6aQjIhZ+Y3y+f9es0rQ+bknM8cMx9/+c2Zc0RVQUREviPAdAAiIrIWi52IyMew2ImIfAyLnYjIx7DYiYh8DIudiMjHsNiJiH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QgD0A3C0wmKufS26893iW70BeBz2/8MVA8gCkOz4/p0A1pVbbhDs74yfhH0Kx9W5GgH4FsBxx9eGju9HA5jnuB8L4BDsR4QcAvCCC/P8y/MH8A6AIY77wQCWAzgBYA+AVm7YR1Vl+gOAw479swlAOzf9Ti0FcB5AieN36wUA4wGMdzwuAD5x5D6EmxyNZSDX/ym3v3YBiHVDpp6wTxMcBLDfcRtken85mcvE/roXQLoj13cA/vsGv/cufS3yk6dERD7Gl6ZiiIgILHYiIp/DYici8jEsdiIiH8NiJyLyMSx2IiIfw2InIvIxLHYiIh/z/wHsZXptNQ7sjwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "xs = np.linspace(-1, 3, num=1000)\n",
    "ys = a1*xs**3 + a2*xs**2 + a3*xs +a4\n",
    "plt.scatter(x, y, s=50, color='red')\n",
    "plt.plot( xs, ys, color='black');"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercice 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEICAYAAABYoZ8gAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8TPf6wPHPI7FGqJIq0iZBbElkvbRURIuqUkoreqm9qWqvpaWkvVqUaynKpaVFubTS0lblXlxKKXotifVnaSQiKQ21tbba8/39MZM0IssgyUyS5/16ndeZOec75zwzzDMn53zP8xVjDEoppYqPEvYOQCmlVMHSxK+UUsWMJn6llCpmNPErpVQxo4lfKaWKGU38SilVzGjiV+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QmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.arange(15,29)\n",
    "y = np.array([1.14,1.11, 1.08,1.06,1.03,1.01,0.983, 0.960, 0.938, 0.917, 0.896, 0.876, 0.857, 0.839])\n",
    "plt.scatter(x, y, s=50, color='red', label='Data points');\n",
    "xs = np.linspace(15, 29, num=1000)\n",
    "ys = -0.019*xs +1.37\n",
    "plt.plot( xs, ys, color='black', label='Linear Approximation');\n",
    "plt.vlines(x=26.5, ymin=0.8, ymax=1.1, color='blue', label='T = 26.5°C ')\n",
    "plt.hlines(y=0.867, xmin=15, xmax=28, color='blue')\n",
    "plt.vlines(x=24.736, ymin=0.8, ymax=1.1, color='orange')\n",
    "plt.hlines(y=0.9, xmin=15, xmax=28, color='orange', label='v =0.9 m2 s-1')\n",
    "plt.legend()\n",
    "plt.title('Exercice2');\n",
    "plt.savefig('Ex2.png')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8665000000000002"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "-0.019*26.5+1.37 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24.736842105263165"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(0.9 -1.37)/-0.019"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercice 3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.array([0,1,2,3,4])\n",
    "y = np.array([0,2,36, 252,1040])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a1 = 35.000000\n",
      "a2 = -89.000000\n",
      "a3 = 56.000000\n",
      "a4 = 0.000000\n"
     ]
    }
   ],
   "source": [
    "a1 = 35\n",
    "a2 = -89\n",
    "a3 = 56\n",
    "a4=0\n",
    "print('a1 = %f' %a1)\n",
    "print('a2 = %f' %a2)\n",
    "print('a3 = %f' %a3)\n",
    "print('a4 = %f' %a4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEICAYAAABS0fM3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xd8FVX6+PHPkwKRhBqCUiJBRYoSQaOChSK6drHgioUN6lqxrS6KuLu6636t+FVQUVkpgoggNmy7XwX8ITYI6ipVQAKEUEInQELK8/vjTEICCQnkJnPL83695nXvnTn3zjOUeeacOXOOqCrGGGMiV5TfARhjjPGXJQJjjIlwlgiMMSbCWSIwxpgIZ4nAGGMinCUCY4yJcJYIjAkgEbleRP7P7ziMORSWCEzYEJFMEdkjIrlllpfqMgZVnaSqvwvkb4pIZxHJEJGt3vKFiHQO5D5MZIvxOwBjAuxSVf2itn5cRGJUtbC2fr8S2UB/YBXu4m0w8DaQWsdxmDBlNQITEUTkFRGZVubz0yIyQ0TE+3yJiPwkIttE5BsRSS1TNlNEHhKRn4FdIhIjIski8p6I5IjI5pKah4gMEpE5Zb57goh8LiJbRGSDiAzz1keJyFARWeF9f6qINKsodlXdpqqZ6oYBEKAIOK42/pxMZLJEYCLFA0Cqd6I+G7gZSFdVFZGTgbHAbUAi8BowXUTql/n+tcDFQBNAgY9xV+gpQGvcFXo5ItIQ+AL4N9AKd/Ke4W2+B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G8iMhn4FuggIlkicrPfMdWyM4GBwDki8pO3XOR3ULWoJTBLRH7GXeh8rqp11qUyktgQE8YYE+EiokZgjDGmcpYIjDEmwlkiMMaYCGeJwBhjIpwlAmOMiXCWCIwxJsJZIjDGmAj3/wHHMOvdVTkypAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "xs = np.linspace(-1, 4, num=1000)\n",
    "ys = 16*xs**2 -14*xs \n",
    "plt.scatter(x, y, s=50, color='red')\n",
    "plt.plot( xs, ys, color='orange', label='Approximation with 3 points');\n",
    "xs = np.linspace(-1, 4, num=1000)\n",
    "ys = a1*xs**3 + a2*xs**2 + a3*xs +a4\n",
    "plt.scatter(x, y, s=50, color='red')\n",
    "plt.plot( xs, ys, color='blue', label='Approximation with 4 points');\n",
    "plt.legend();\n",
    "plt.title('Exercice 3');\n",
    "plt.savefig('Ex3.png')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exercice 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[24.2       ],\n",
       "        [ 0.65714286]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "from numpy.linalg import inv\n",
    "X = np.matrix([[1,65],[1,63],[1,67],[1,64]])\n",
    "y = np.matrix([[68,66,68,65]])\n",
    "\n",
    "def least_square_estimator(X, y):\n",
    "    step1 = np.transpose(X) * X\n",
    "    leftpart = inv(step1)\n",
    "    rightpart = np.transpose(X)* np.transpose(y)\n",
    "    return(leftpart * rightpart)\n",
    "least_square_estimator(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "y = np.matrix([[68],[66],[68],[65]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
       "         normalize=False)"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "reg_1 = LinearRegression()\n",
    "reg_1.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.        , 0.65714286]])"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_1.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([24.2])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_1.intercept_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The model performance for testing set is\n",
      "R2 score is 0.56\n"
     ]
    }
   ],
   "source": [
    "y_predict = reg_1.predict(X)\n",
    "r2 = round(reg_1.score(X, y),2)\n",
    "\n",
    "print(\"The model performance for testing set is\")\n",
    "print('R2 score is {}'.format(r2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.matrix([[65],[63],[67],[64]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=False, n_jobs=None,\n",
       "         normalize=False)"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_1 = LinearRegression(fit_intercept=False)\n",
    "reg_1.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.03069313]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_1.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.0"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_1.intercept_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The model performance for testing set is\n",
      "R2 score is 0.38\n"
     ]
    }
   ],
   "source": [
    "y_predict = reg_1.predict(X)\n",
    "r2 = round(reg_1.score(X, y),2)\n",
    "\n",
    "print(\"The model performance for testing set is\")\n",
    "print('R2 score is {}'.format(r2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
